package com.mediator.self;

public class AirCondition extends Appliance{

    public AirCondition(String name, ApplianceMediator applianceMediator) {
        super(name, applianceMediator);
        applianceMediator.register(this,name);
    }

    public void openAirCondition(){
        System.out.println("空调打开了");
    }

    public void closeAirCondition(){
        System.out.println("空调关闭了");
    }

    @Override
    public void sendMessage(int messageType) {
        super.getApplianceMediator().getMessage(messageType,super.name);
    }
}
